package com.service;

import com.dao.LoginDao;
import com.entity.Login;
import com.entity.LoginUser;
import com.entity.UserRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author WZ
 * @version 1.0
 * @date 2021/8/23 10:10
 */
@Service
public class LoginService {
@Autowired
    private LoginDao loginDao;
//查询数据库验证密码是否正确

    public List<Login> login(String account){

        List<Login> password2=loginDao.login(account);

        return password2;

    }
//返回用户信息
    public List<LoginUser> finduserlist(String account){
      return   loginDao.findUser(account);
    }

    public List<UserRole> findroles(String userId){
        return  loginDao.findRole(userId);
    }
public List<UserRole> allRole(){
        return loginDao.AllRole();
}
}
